﻿<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="keywords" content="jQuery, Switchable, Tabs, Slide, Scrollable, UI, Plugin, Ajax" />
	<meta name="description" content="jQuery.Switchable是一款整合了Tabs、Slide、Scrollable等常见UI组件的jQuery插件。它有简单易用的API、可灵活配置的Configuration，支持自定义Effect，支持自主开发Plugin。" />
	<link href="../css/css.css" rel="stylesheet" type="text/css" />
	<link href="../css/demo.css" rel="stylesheet" type="text/css" />

	<!-- syntaxhighlighter -->
	<link href="../../asset/styles/shCore.css" rel="stylesheet" type="text/css" />
	<link href="../../asset/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />

	<link href="/asset/favicon.png" rel="icon" type="image/png" />
	<title>Demos | jQuery.Switchable</title>
	<script type="text/javascript" src="../../asset/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="../js/jquery.switchable[all].min.js"></script>

	<!-- syntaxhighlighter -->
	<script type="text/javascript" src="../../asset/scripts/shCore.js"></script>
	<script type="text/javascript" src="../../asset/scripts/shBrushJScript.js"></script>

	<script type="text/javascript">
	$(function(){
		$(".tabs-trigger").switchable(".tabs-panel > p");
		$(".slide-trigger").switchable(".slide-panel > img", { effect: "fade", speed: .3 });
		window.api = $(".scrollable-trigger").switchable(".scrollable-panel > div > img", {
			triggerType: "click",
			effect: "scroll",
			steps: 3,
			visible: 3,
			api: true
		});
		$(".next").click(function(){
			api.next();
		});
		$(".prev").click(function(){
			api.prev();
		});
	});
	
	// syntaxhighlighter
	SyntaxHighlighter.config.clipboardSwf = "../asset/scripts/clipboard.swf";
	SyntaxHighlighter.all();
	</script>
</head>

<body>
<div id="header">
	<div id="logo"></div>
	<div id="nav">
		<a href="../">Home</a>
		<a href="../download.html">Download</a>
		<a href="index.html" class="current">Demos</a>
		<a href="http://t.sina.com.cn/jsw0528" title="Follow me on Sina" class="sina" target="_blank">Sina</a>
		<a href="http://twitter.com/jsw0528" title="Follow me on Twitter" class="twitter" target="_blank">Twitter</a>
	</div>
</div>

<div class="wrap clearfix">
	<h2>Simple Demos</h2>

	<h3>Tabs</h3>
	<div class="tabs-trigger">
		<a href="#First">First</a>
		<a href="#Second">Second</a>
		<a href="#Third">Third</a>
	</div>
	<div class="tabs-panel">
		<p>Tab Panel 1 <a href="#Third">Open third tab</a></p>
		<p>Tab Panel 2</p>
		<p>Tab Panel 3 <a href="#Second">Open second tab</a></p>
	</div>
	<pre class="brush: js;">
	$(function(){
		$(".tabs-trigger").switchable(".tabs-panel > p");
	});
	</pre>

	<br />
	<h3>Slide</h3>
	<div class="slide-container">
		<div class="slide-panel clearfix">
			<img src="http://img.alimama.cn/bcrm/adboard/picture/2010-02-27/100227200543.jpg" />
			<img src="http://img.alimama.cn/bcrm/adboard/picture/2010-02-25/100225114729.gif" />
			<img src="http://img.alimama.cn/bcrm/adboard/picture/2010-02-26/100226150931.jpg" />
			<img src="http://img.alimama.cn/bcrm/adboard/picture/2010-02-25/100225173603.jpg" />
			<img src="http://img.alimama.cn/bcrm/adboard/picture/2010-02-22/100222173158.jpg" />
		</div>
		<div class="slide-trigger"><!-- 自动创建 triggers --></div>
	</div>
	<pre class="brush: js;">
	$(function(){
		$(".slide-trigger").switchable(".slide-panel > img", { effect: "fade", speed: .3 });
	});
	</pre>

	<br />
	<h3>Scrollable</h3>
	<div class="trigger-bar">
		<a href="javascript:void(0);" title="下翻" class="next"></a>
		<a href="javascript:void(0);" title="上翻" class="prev"></a>
		<div class="scrollable-trigger"></div>
	</div>
	<div class="scrollable-panel">
		<div class="clearfix">
			<!-- 1~3 -->
			<img src="http://img04.taobaocdn.com/tps/i4/T1uRBrXe0XXXXXXXXX-120-60.gif" />
			<img src="http://img02.taobaocdn.com/tps/i2/T1bQVrXaVpXXXXXXXX-120-60.gif" />
			<img src="http://img01.taobaocdn.com/tps/i1/T1l7FrXgNvXXXXXXXX-120-60.gif" />
			<!-- 4~6 -->
			<img src="http://img04.taobaocdn.com/tps/i4/T1ikRrXglqXXXXXXXX-120-60.gif" />
			<img src="http://img01.taobaocdn.com/tps/i1/T1XYRsXipXXXXXXXXX-120-60.gif" />
			<img src="http://img06.taobaocdn.com/tps/i6/T1MQ8rXe8kXXXXXXXX-120-60.gif" />
			<!-- 7~9 -->
			<img src="http://img05.taobaocdn.com/tps/i5/T1mOJsXXdEXXXXXXXX-120-60.gif" />
			<img src="http://img06.taobaocdn.com/tps/i6/T1bkNrXb8sXXXXXXXX-120-60.gif" />
			<img src="http://img07.taobaocdn.com/tps/i7/T1Ck8rXiXkXXXXXXXX-120-60.gif" />
		</div>
	</div>
	<pre class="brush: js;">
	$(function(){
		window.api = $(".scrollable-trigger").switchable(".scrollable-panel > div > img", {
			triggerType: "click",
			effect: "scroll",
			steps: 3,
			visible: 3,
			api: true
		});
		$(".next").click(function(){
			api.next();
		});
		$(".prev").click(function(){
			api.prev();
		});
	});
	</pre>

	<br />
	<h2>More demos</h2>

	<h3>Tabs</h3>
	<ol class="list">
		<li><a href="tabs/ajax.html" target="_blank">Loading contents with AJAX</a></li>
		<li><a href="tabs/accordion.html" target="_blank">Accordion</a></li>
		<li><a href="tabs/h-accordion.html" target="_blank">Horizontal Accordion</a></li>
		<li><a href="tabs/multiple.html" target="_blank">Multiple Tabs</a></li>
		<li><a href="tabs/callback.html" target="_blank">Using callback function</a></li>
		<li><a href="tabs/plugin.html" target="_blank">Plugins in action</a></li>
	</ol>

	<h3>Slide</h3>
	<ol class="list">
		<li><a href="slide/scroll.html" target="_blank">Horizontal/Vertical Scrolling</a></li>
		<li><a href="slide/plugin.html" target="_blank">Plugins in action</a></li>
		<li><a href="slide/without-triggers.html" target="_blank">Without triggers</a></li>
	</ol>

	<h3>Scrollable</h3>
	<ol class="list">
		<li><a href="scrollable/plugin.html" target="_blank">Plugins in action</a></li>
		<li><a href="scrollable/easing.html" target="_blank">Custom animation</a></li>
		<li><a href="scrollable/widget.html" target="_blank">Custom widget</a></li>
	</ol>
	
	<h3>Live Demo</h3>
	<ol class="list">
		<li><a href="taobao/" target="_blank">taobao.com</a></li>
	</ol>
</div>

<p class="copyright">
<script type="text/javascript" src="http://s122.cnzz.com/stat.php?id=1946178&web_id=1946178&show=pic1"></script>
&copy;2010 IlikejQuery.com
</p>
</body>
</html>
